user_input = input("请输入一段文字：")
file_path = "D:\\hello.txt"
with open(file_path, 'w') as file:
    file.write(user_input)

print("文件已保存在：D:\\hello.txt")
